Enterprises are increasingly capturing, storing, and mining a plethora of information related to communications with their customers and related to their day-to-day internal operations. Often this information is stored and indexed within databases. Once the information is indexed, queries are developed on an as-needed basis to mine the information from the database for a variety of organizational goals, such as marketing, planning, reporting, etc.
In fact, the size of the databases can be daunting and each database can include many terabytes of information. To deal with this, an enterprise deploys a variety of hardware resources: storage devices, processing devices, network devices, etc. In addition, a variety of software resources are needed to optimally utilize the hardware resources associated with databases. Still further a plethora of expensive and skilled support and development staff is needed to maintain the databases and keep them operational.
One solution to address the software resources, and which has a significant bearing on the hardware and human resources, is to implement query execution plans that are tested or automatically evaluated before any particular query is executed against a database. This permits queries to be somewhat optimized and also permits glaring problems to be detected before the queries execute against the database. Query performance can be a major issue, such as when a particular query takes several hours to process against the database and consumes a large amount of processing resources during execution.
However, sometimes a particular query may run against different versions of a database or against different databases entirely. The problem can be even more complex when multiple queries run against multiple databases. When these situations occur, the database administrator may want to compare multiple query plans against one another to select optimal ones or to determine potential bottlenecks in advance of any real execution. Such comparisons are often manual and even with semi automated tools the comparisons can be very difficult to efficiently examine.
Thus, improved mechanisms for scoring and comparing query execution plans are desirable.